﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="InformesConsultar.aspx.cs" Inherits="AudiPyme.UI.InformesConsultar"
    EnableEventValidation="false" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="PanelOpciones" runat="server">
        <ul class="list1" id="ListaOpciones" runat="server">
        </ul>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id='basic-modal' style="text-align: right">
        <a href='#' class='basic'>
            <img src="/Images/Icono_ayuda.jpg" alt="Pinche para ver un video tutorial de la página"
                width="30 " height="30" border="0"></a>
    </div>
    <!-- modal content -->
    <div id="basic-modal-content">
        <iframe width="853" height="480" src="http://www.youtube.com/embed/jWNbut7AcUk" frameborder="0"
            allowfullscreen></iframe>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <h2>
        Informes Consultar</h2>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="PnlGV" runat="server" Visible="True">
                <asp:CheckBox ID="CheckBox3" runat="server" AutoPostBack="true" Visible="false" OnCheckedChanged="CheckBox3_CheckedChanged"
                    Text=" Ver Último Informe Consultado" />
                <br />
                <h5>
                    Buscar por Fecha</h5>
                <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFiltro"
                    Format="dd-MM-yyyy">
                </asp:CalendarExtender>
                <asp:TextBox ID="TxtFiltro" runat="server" Height="18px" Width="70px" MaxLength="10"></asp:TextBox>
                <asp:Button ID="BtnBuscar" runat="server" Text="Buscar" OnClick="BtnBuscar_Click"
                    Width="80px" />
                <p>
                </p>
                <asp:GridView ID="GVAmenazas" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                    OnPageIndexChanging="GVAmenazas_PageIndexChanging" CssClass="myDatagrid">
                    <Columns>
                        <asp:BoundField DataField="IdInforme" HeaderText="Id Informe" ReadOnly="true" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField DataField="Fecha" HeaderText="Fecha" ReadOnly="true" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField DataField="TipoInforme" HeaderText="Tipo Informe" ReadOnly="true" />
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                            <HeaderTemplate>
                                <asp:Label ID="LblToolOpciones" runat="server" Text="Selección" ToolTip='Seleccione el Informe a Consultar'></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBox_Changued" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <br />
                <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" Enabled="False" OnClick="BtnConsultar_Click"
                    Width="80px" />
                <br />
                <br />
            </asp:Panel>
            <asp:Panel ID="PnlReport" runat="server" Visible="False">
                <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBox2_CheckedChanged"
                    Text=" Consultar Otros Informes" />
                <br />
                <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="730px" 
                    ShowPrintButton="False" ShowRefreshButton="False">
                </rsweb:ReportViewer>
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="BtnConsultar" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
        DisplayAfter="0">
        <ProgressTemplate>
            <div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;
                left: 35%; top: 25%; visibility: visible; vertical-align: middle; border-style: inset;
                border-color: black; background-color: #c8d1d4;">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon_inprogress.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:ModalPopupExtender ID="ModalProgress" runat="server" TargetControlID="UpdateProgress1"
        BackgroundCssClass="modalBackground" PopupControlID="UpdateProgress1" />
    <script type="text/javascript" language="javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(activaProgreso);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(desactivaProgreso);
        function activaProgreso(sender, args) {
            // shows the Popup
            $find(ModalProgress).show();
        }
        function desactivaProgreso(sender, args) {
            //  shows the Popup
            $find(ModalProgress).hide();
        }
        var ModalProgress = '<%= ModalProgress.ClientID %>';
    </script>
</asp:Content>
